import React, { Component } from 'react'
import B from './B'
import context from './context'
const {Provider} = context

export default class A extends Component {g
	state = {car:'奔驰c63',name:'老刘'}
	render() {
		return (
			<div style={{backgroundColor:'gray',padding:'10px'}}>
				<h2>我是A组件，我有台车：{this.state.car}</h2>
				<Provider value={{...this.state}}>
					<B/>
				</Provider>
			</div>
		)
	}
}
